<template>
    <div class="container">
        <div class="top">
            <img src="./activity-img/20190719152020.png">
        </div>
        <div class="chongzhi">
            <div>充值19元  多送1900书币</div>
            <div>共得3800书币</div>
        </div>
<!--        <div class="time">活动时间</div>-->
        <div class="img">
            <a :href="productUrl(9)">
                <img src="./activity-img/20190719152035.gif">
            </a>
        </div>
        <div class="tishi">
            <div>温馨提示：</div>
            <div>1.此充值为书币充值；</div>
            <div>2.书币为虚拟物品，不支持退货；</div>
            <div>3.此充值只限单次充值</div>
            <div>4.活动最终解释权归本公司所有。</div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "tehui",
        data(){
            return{
                successUrl:encodeURIComponent( 'http://'+document.domain+'/index'),
            }
        },
        created:function () {
            this.set()
        },
        methods:{
            set:function(){
                this.$emit('set','hide')
            },
            productUrl(id) {
                let url = `/buy?ProductID=`+id+
                    `&SuccessRedirect=`+this.successUrl+
                    `&FailedRedirect=`+this.successUrl;
                return this.$axios.defaults.linkUrl(url);
            }
        }
    }
</script>

<style scoped>
    .container{
        min-height: 100vh;
        background-color: #3935cd;
        margin-bottom: 0px;
    }
    .top img{
        width: 100%;
    }
    .chongzhi{
        width: 230px;
        margin: auto;
        text-align: center;
        border: 3px solid #62dbff;
        padding: 20px 10px 10px;
        font-size: 18px;
        color: white;
    }
    .chongzhi div{
        margin-bottom: 10px;
    }
    .img{
        width: 200px;
        margin: 30px auto;
        text-align: center;
    }
    .img img{
        width: 100%;
    }
    .tishi{
        margin: 0px 20px;
        font-size: 14px;
        color: white;
    }
    .tishi div{
        padding: 10px 0px;
    }
</style>